package algorithm.interview.other;

public class codeTest {
    public static void main(String[] args){
//        test1();
        test12();

    }

    public static void test12(){
        byte i= 127;      //127
        byte i1= (byte) 128; //-128
        byte i2= (byte) 129; //-129
        System.out.println(i);
        System.out.println(i1);
        System.out.println(i2);

        long il=0xfffL; // 4095
        long ia=0x100L; // 256
        long ib=0x100;
        System.out.println(il);
        System.out.println(ia);
        System.out.println(ib);

        double id=0.9239d; //0.9239
        double is=0.9;  //0.9


        System.out.println(id);
        System.out.println(is);

        System.out.println("==========================");

        float iz= (float) 0.9; //0.9
        float ix= 0.9f; //0.9
        System.out.println(iz);
        System.out.println(ix);


    }

    public static void test1(){
        byte i= (byte) 128;
//        boolean i2=null; //error
        boolean i2= Boolean.parseBoolean(null); //error
        boolean is= Boolean.parseBoolean("1"); // parseBoolean的参数类型只支持String
        Boolean a =null;
        long i3=0xfffL;
        double i4=0.9239d;
        long l=0xfffL;

        System.out.println(l);

    }

    public static void test13(){
        byte i= 127;      //127
        byte i1= (byte) 128; //-128
        byte i2= (byte) 129; //-129
        System.out.println(i);
        System.out.println(i1);
        System.out.println(i2);

        long il=0xfffL; // 4095
        long ia=0x100L; // 256
        long ib=0x100;
        System.out.println(il);
        System.out.println(ia);
        System.out.println(ib);

        double id=0.9239d; //0.9239
        double is=0.9;  //0.9


        System.out.println(id);
        System.out.println(is);

        System.out.println("==========================");

        float iz= (float) 0.9; //0.9
        float ix= 0.9f; //0.9
        System.out.println(iz);
        System.out.println(ix);


    }




}
